/**
 * @description: 菜单store
 *
 */

import { defineStore } from "pinia";
import storage from "../utils/storage";

const useMenuStore = defineStore("menuStore", {
  state: () => ({
    menuList: storage.getItem("menuList") || [],
  }),
  actions: {
    setMenuList(menuList) {
      this.menuList = menuList;
      storage.setItem("menuList", menuList);
    },
  },
});

export default useMenuStore;
